package org.zfes.snowier.cloud.zbss.cms.router.service.column;

import java.util.Map;
import java.util.Optional;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.MediaType;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
import org.zfes.snowier.core.data.DataSet;
import org.zfes.snowier.web.controller.BaseController;
import org.zfes.snowier.cloud.zbss.cms.column.model.CmsColumnTxt;
import org.zfes.snowier.cloud.zbss.cms.column.service.ICmsColumnTxtService;
@Controller("org.zfes.snowier.cloud.zbss.cms.router.admin.column.CmsColumnTxtController")   
@RequestMapping("/cms/service/column/cmsColumnTxt")
public class CmsColumnTxtController extends BaseController {

	
	@Autowired
	private ICmsColumnTxtService cmsColumnTxtService;
	
	@RequiresPermissions(value="cmsColumnTxt:loadCmsColumnTxtDataSet",desc="栏目详情列表")
    @RequestMapping(value="/loadCmsColumnTxtDataSet", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
    public @ResponseBody  Object loadCmsColumnTxtDataSet(@RequestParam Map<String,Object> params){
	    DataSet dataSet=  cmsColumnTxtService.loadCmsColumnTxtDataSet(params);
	    return ajaxQuery("dataSet", dataSet);
    }
	
	@RequiresPermissions(value="cmsColumnTxt:loadCmsColumnTxt",desc="栏目详情加载")
    @RequestMapping(value="/loadCmsColumnTxt", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
    public @ResponseBody  Object loadCmsColumnTxt(Long id){
		Optional<CmsColumnTxt> ops = cmsColumnTxtService.loadCmsColumnTxtById(id);
		return ajaxQuery("cmsColumnTxt",ops);
    }


}